Note that this is not part of the Playlist. See the textbook, chapter 7 instead.

Eligibility Traces

In Chapter Four we discussed \(n\)-step TD algorithms, where we take the trace of the next \(n\) rewards for a state and accumulating into a single update.

However, we may combine multiple traces, for each \(n\). In particular, we shall combine all possible traces, weighting geometrically by a \(\lambda\) parameter.

For example, for a reward \(r_t\), we shall acredit it to the states preceding it.

This allows for a smoother convergence (from being similar to MC) while also being quick to train (being similar to TD). Note that choosing lambda, it may approach MC (\(\lambda = 1\)), or it may approach \(1\)-step TD (\(\lambda = 0\)).

Tabular and Continuous Case

A state \(s\) is eligibile to receive accreditation for a reward when it was visited. In particular (for accumulating traces), we define an \(E\) vector, s.t.

\begin{align} E(s_t) &\xleftarrow{} \gamma \lambda (E(s_t) + 1) \\ E(s \ne s_t) &\xleftarrow{} \gamma \lambda E(s) \\ \end{align}

Thus, we have the following algorithm:

In the continuous case, we do not accumulate eligiblity for states, as each individual state has no impact. Thus, we only decay traces.

Home 1 2 3 4(b) 5 6